8314491: Linux: jexec launched via PATH fails to find java
authorVladimir Petko <vladimir.petko@canonical.com>
Tue, 25 Aug 2026 07:29:15 +0000 (09:29 +0200)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Tue, 25 Aug 2026 07:29:15 +0000 (09:29 +0200)
commite0936ac8e94116a2c536312b4098790d35c10150
tree59f2d87112541a791c1e0f7b8372ab568fa1264c
parentf14327f30ccc3b1468ee3fdbe4a7dc00f95e83cf
8314491: Linux: jexec launched via PATH fails to find java

Bug: https://github.com/openjdk/jdk/pull/15343
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029342
Applied-Upstream: dab1c213fd2760686a7bf3fc8838f4a21056a954
Last-Update: 2023-09-11

 jexec uses argv[0] parameter to find its own location.
 argv[0] is populated with the command value causing a failure to locate java
 when jexec is found in the PATH (in this case argv[0] contains just 'jexec')

Gbp-Pq: Name 8314491-jexec.patch
src/java.base/unix/native/launcher/jexec.c
test/jdk/tools/launcher/Jexec.java